﻿using HtmlConverter;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RTF2Image
{
    public class Rtf2ImageConverter
    {
        HtmlCapture hc;
        public Rtf2ImageConverter()
        {
            hc = new HtmlCapture();
        }

        public Bitmap CreateImage(String rtf)
        {
            String html = Itenso.Solutions.Community.Rtf2Html.RtfToHtml.ConvertString(rtf);
            return hc.Create(html);
        }
    }
}
